<template>
    <!-- npm run serve -->
    <div id="publicity">
        <h1 v-for=" i in isApply">{{ i.name }}</h1>
    </div>
</template>
<script>
import { ref, computed } from "vue";
export default {
    setup() {
        name:'publicity';
        const students = [
            { name: "一号", isApply: true, is18: false },
            { name: "八号", isApply: true, is18: false },
            { name: "十八号", isApply: true, is18: false },
            { name: "三十六", isApply: false, is18: true },
            { name: "小明", isApply: true, is18: false },
            { name: "and", isApply: true, is18: false },
            { name: "和", isApply: true, is18: true },
            { name: "号码", isApply: false, is18: false },
            { name: "好了", isApply: false, is18: false },
            { name: "好好找", isApply: true, is18: false },
            { name: "91284", isApply: true, is18: true },
        ];
        const isApply = computed(() => {
            console.log('isapply');
            return students.filter(element => element.isApply & element.is18)
        })
        return {
            students,
            isApply,
        }
    }

}

</script>
<style>
</style>